﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace Sgr.Email
{
    /// <summary>
    /// 邮件服务
    /// </summary>
    public interface ISmtpService
    {
        /// <summary>
        /// 发送邮件
        /// </summary>
        /// <param name="smtpInfo"></param>
        /// <param name="message"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<SmtpResult> SendAsync(
            SmtpInfo smtpInfo,
            MailMessage message,
            CancellationToken cancellationToken = default);
    }
}